﻿#pragma once

#include <mutex>
#include "Containers/Vector.h"
#include "TextureFormat.h"


//纹理像素数据,用于在各个线程之间传递纹理数据
class CTexture2DPixels
{

public:

    bool IsDirty() const
    {
        return bDirty;
    }

    //保护所有数据的互斥锁,包括bDirty
    std::mutex Mutex;

    TVector<uint8_t> Data;
    uint32_t Width=0;
    uint32_t Height=0;
    uint32_t Pitch=0;
    ETextureFormat Format;
    bool bDirty=false;

};

